<template>
  <div class="error-container">
    <div class="error-content">
      <div class="error-image">
        <svg viewBox="0 0 404 300" xmlns="http://www.w3.org/2000/svg">
          <defs>
            <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
              <stop offset="0%" style="stop-color:#1890ff;stop-opacity:1" />
              <stop offset="100%" style="stop-color:#096dd9;stop-opacity:1" />
            </linearGradient>
          </defs>
          <text x="50%" y="50%" text-anchor="middle" dominant-baseline="middle" 
                font-size="120" font-weight="bold" fill="url(#gradient)" opacity="0.1">
            404
          </text>
        </svg>
      </div>
      
      <div class="error-info">
        <h1 class="error-title">页面未找到</h1>
        <p class="error-description">
          抱歉，您访问的页面不存在或已被移除。
        </p>
        <div class="error-actions">
          <el-button type="primary" @click="goHome">
            🏠 返回首页
          </el-button>
          <el-button @click="goBack">
            ← 返回上页
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
// 暂时移除图标导入

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style lang="scss" scoped>
.error-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
}

.error-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.error-image {
  margin-bottom: 40px;
  
  svg {
    width: 100%;
    max-width: 400px;
    height: auto;
  }
}

.error-info {
  .error-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .error-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
  }
  
  .error-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    
    .el-button {
      padding: 12px 24px;
      font-size: 16px;
      min-width: 120px;
    }
  }
}

@media (max-width: 768px) {
  .error-info {
    .error-title {
      font-size: 36px;
    }
    
    .error-description {
      font-size: 16px;
    }
    
    .error-actions {
      flex-direction: column;
      align-items: center;
      
      .el-button {
        width: 200px;
      }
    }
  }
}
</style>